package com.surveypark.service;

import java.util.List;
import java.util.Set;

import com.surveypark.domain.security.Right;

public interface RightService extends BaseService<Right>{

	/**
	 * ��������Ȩ�ޡ�Ȩ���������㷨���£�
	 * ����ݿ���û�б���Ȩ��λ��ʱ�����{@code rightCode = 1, rightPos = 0};ÿ������һ��Ȩ��ʱ��{@code rightCode = topRightCode<<1}��
	 * ��߿����ƶ�60λ����{@code rightCode == topRightCode}ʱ��{@code rightPos = topRightPos+1}
	 */
	public void saveOrUpdateRight(Right model);

	public void appendRightByURL(String url);

	public void batchUpdateRights(List<Right> allRights);

	public List<Right> findRightsNotInRange(Set<Right> rights);

	public List<Right> findRightsInRange(Integer[] ownRightIds);

	/**
	 * 查询最大权限
	 */
	public int getMaxRightPos();
}
